SDK Initialization

You should first initialize SDK resources.

You can refer to the following sample codes to initialize SDK resources and release SDK resources.
if __name__ == "__main__":
# 1. Initialize SDK resources
MvCamera.MV_CC_Initialize()
# 2. Enumerate and control the devices, and get images
# 3. Release SDK resources
MvCamera.MV_CC_Finalize()
  1. Call MV_CC_Initialize() to initialize the SDK running environment This operation requests and allocates the necessary system resources in advance, ensuring that the SDK can run reliably.
  2. After initializing SDK resources, you can call other APIs to initialize the camera or frame grabber, configure parameters, get images, and process images.
  3. After all these operations, you can call MV_CC_Finalize() to release SDK resources.
Attention
In a single process, you can call MV_CC_Initialize() and MV_CC_Finalize() each for once.